package com.liliudong.cursormate.service.impl;

import com.liliudong.cursormate.common.constant.ConfigConst;
import com.liliudong.cursormate.mapper.SysPermissionMapper;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Liudong.li
 * @description 针对表【sys_role(用户角色)】的数据库操作Service实现
 * @createDate 2023-10-24 22:29:24
 */
@Service
@ConditionalOnProperty(name = {ConfigConst.CURSOR_MATE_POLICY}, havingValue = ConfigConst.CURSOR_MATE_POLICY_ADMIN)
public class SysRoleAdminServiceImpl extends SysRoleServiceImpl {

    public SysRoleAdminServiceImpl(SysPermissionMapper sysPermissionMapper) {
        super(sysPermissionMapper);
    }

    @Override
    public List<String> getRoleList(Long loginId) {
        // 管理员获取全部的角色
        return baseMapper.selectRoleListInterceptorIgnore();
    }
}




